Youtube series
Git is a version controller (of files), it has a lot of features for making
collaboration really nice.
Is the actual version controller software, invented by the guy who invented
Linux.
Web site/social network where you can do projects that have version control on them
This key concepts are shown in the video using only github
Think of the history of a project as a tree. Branches are separate paths
Not a git concept, it's just a feature available in github. Supports markdown. They
do have identifiers, a commit may refer to it. Can be used to identify bugs, or
comments about a project in general.
No further new information :)
You can use Git in your own local computer.
Key concepts
Commands
git
: before the use of any commandgit
+ clone
+httpp//something//blahblah
clones a repository into the folder where you execute the commandgit
+status
can only be executed when you're located inside a repository, and returns thte status of the repository.git
+commit
local commitmentgit commit -a
-m "Changes"
usual flag to add a message in the previous commnadgit config --global user.name "Your Name"
set the name of the authorgit config --global user.email "you@example.com"
set the email of the authorgit config --list
list all the cofiguration settings on the local computergit
+ log
list all the commitments (like viewing tree): q
in case you get stuck within VIMgit
+remote
lists all the remotes associated with my projectgit
+remote
+-v
verbosegit
+push
+origin
+branch
branch could be master, etc.Key concepts
Save and commit are different steps. Save is the act of modifying the file on the hard drive, commiting is the act of adding that change to the story of the repository.
Commands
git
+init
: turn a directory into a repositorygit
+add
+"file.ext"
: adds file to the staging areagit
+add
+.
add everything inside the repo to the staging area, so files can be tracked.If we want to upload this changes to a Github repository we can't use git push origin master
because we didn't clone the repo from an existing one in Github.
What we have to do, then?
First create a host repository in Github, after that execute the following commands:
git remote add origin
+url
git push origin master
git pull origin main
pulls all the changes made in the remote copy of the repository